import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    component: () => import('../views/Index.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/tec',
    name: 'tec',
    component: () => import('../views/Index.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/finance',
    name: 'finance',
    component: () => import('../views/Index.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/current',
    name: 'current',
    component: () => import('../views/Index.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/international',
    name: 'international',
    component: () => import('../views/Index.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/result',
    name: 'result',
    component: () => import('../views/Result.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/Login.vue'),
    meta: {
      showNav: false
    }
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/Register.vue'),
    meta: {
      showNav: false
    }
  },
  {
    path: '/newDetail',
    name: 'newDetail',
    component: () => import('../views/NewDetail.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/nav',
    name: 'nav',
    component: () => import('../components/NavBar.vue'),
    meta: {
      showNav: false
    }
  },
  {
    path: '/individual',
    name: 'individual',
    component: () => import('../views/Individual.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/edit',
    name: 'edit',
    component: () => import('../views/Edit.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/resetPassword',
    name: 'resetPassword',
    component: () => import('../views/ResetPassword.vue'),
    meta: {
      showNav: false
    }
  },
  {
    path: '/like',
    name: 'like',
    component: () => import('../views/MyLike.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/collect',
    name: 'collect',
    component: () => import('../views/MyCollect.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/card',
    name: 'card',
    component: () => import('../views/MyCard.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/visit',
    name: 'visit',
    component: () => import('../views/Visit.vue'),
    meta: {
      showNav: true
    }
  },
  {
    path: '/review',
    name: 'review',
    component: () => import('../views/Review.vue'),
    meta: {
      showNav: true
    }
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
